import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '@/Layout'
import RecomendView from '@/views/RecommendView'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: Layout,
    children: [
      {
        path: '',
        component: RecomendView
      },
      {
        path: '/hot',
        component: () => import('../views/HotView')
      },
      {
        path: '/search',
        component: () => import('../views/SearchView')
      }
    ]
  },
  {
    path: '/play',
    component: () => import('../views/PlayView')
  }
]

const router = new VueRouter({
  routes
})

export default router
